package com.ccp.dev.workflow.model;

import com.ccp.dev.system.model.Resources;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.util.Date;

/**
 * ClassDescribe:
 * 指定任务执行人历史实体
 * @author :wangcheng
 * Date: 2019-07-24
 */
public class BpmFlowUserHistory {
    /**
     * 主键ID
     */
    private String id;

    /**
     * 自定义流程ID
     */
    private String flowId;

    /**
     * 使用自定义流程的用户ID
     */
    private String userId;

    /**
     * 不同节点分配用户的JSON字符串
     */
    private String userHistory;

    /**
     * 创建时间
     */
    private Date createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFlowId() {
        return flowId;
    }

    public void setFlowId(String flowId) {
        this.flowId = flowId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserHistory() {
        return userHistory;
    }

    public void setUserHistory(String userHistory) {
        this.userHistory = userHistory;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @see java.lang.Object#equals(Object)
     */
    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Resources)) {
            return false;
        }
        BpmFlowUserHistory rhs = (BpmFlowUserHistory) object;
        return new EqualsBuilder()
                .append(this.id, rhs.id)
                .append(this.flowId, rhs.flowId)
                .append(this.userId, rhs.userId)
                .append(this.userHistory, rhs.userHistory)
                .append(this.createTime, rhs.createTime)
                .isEquals();
    }


    /**
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", this.id)
                .append("flowId", this.flowId)
                .append("userId", this.userId)
                .append("userHistory", this.userHistory)
                .append("createTime", this.createTime)
                .toString();
    }
}
